package com.example.origin.alibaba.bsever.service;

import com.example.origin.alibaba.bsever.service.impl.DemoFallBackHandler;
import com.delicacy.grape.alibaba.common.dto.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "alibaba-asever",fallback = DemoFallBackHandler.class)
public interface DemoFeign {

    @GetMapping("getUser/{userId}")
    User getUser(@PathVariable("userId") String userId);

    @GetMapping("listUser}")
    List<User> listUser();

}
